package com.heima.behavior.controller.v1;

import com.heima.behavior.service.ApBehaviorEntryService;
import com.heima.model.behavior.pojo.ApBehaviorEntry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by ZYJ on 2021/6/5 1:10
 */
@RestController
public class ApBehaviorEntryController {
    @Autowired
    ApBehaviorEntryService entryService;

    @PostMapping("hahaha")
    public ApBehaviorEntry findBehaviorEntry(@RequestParam(value = "userId",required = false) Integer userId,
                                             @RequestParam(value = "equipmentId",required = false)Integer equipmentId){
        return entryService.findByUserIdOrEquipmentId(userId,equipmentId);
    }
}
